#!/usr/bin/env python3
# -*- coding: utf-8 -*-

''
from urllib import request

with request.urlopen('https://api.douban.com/v2/book/2129650') as f:
    print(type(f)) # <class 'http.client.HTTPResponse'>
    data = f.read()
    print('Status:', f.status, f.reason) # Status: 200 OK
    for k, v in f.getheaders():
        print('%s:%s' % (k, v))
    print('Data:',data.decode('utf-8'))
